import service from "../service";



// 在发送 GET 请求时，使用 params 参数传递查询参数：axios.get('/api/url', { params: params })。

//获取编辑推荐的数据
export function getRecommendListApi(
    data: { limit: number }
) {
    return service({
        method: "GET",
        url: "/personalized?limit=6",
        params: data,
    })
};


// 获取最新音乐的数据
export function getNewsongApi(
    data: { limit: number }
) {
    return service({
        method: "GET",
        url: "/personalized/newsong",
        params: data,
    })
};


// 获取热歌榜的数据
export function getToplistApi(
    data: { limit: number }
) {
    return service({
        method: "GET",
        url: "/playlist/detail",
        params: data,
    })
};

// 获取歌手详情的数据
export function getSingerDetailsApi(
    data: { limit: number }
) {
    return service({
        method: "GET",
        url: "/artist/detail",
        params: data,
    })
};

export function getSingerSongsApi(
    data: { limit: number }
) {
    return service({
        method: "GET",
        url: "/artist/top/song",
        params: data,
    })
};

export function getSingerCountsApi(
    data: { limit: number }
) {
    return service({
        method: "GET",
        url: "/artist/follow/count",
        params: data,
    })
};

// 获取音乐列表的数据
export function getPlaylistApi(
    data: { limit: number }
) {
    return service({
        method: "GET",
        url: "/playlist/detail",
        params: data,
    })
};

// 获取音乐专辑的数据
export function getCollectionApi(
    data: { limit: number }
) {
    return service({
        method: "GET",
        url: "/album",
        params: data,
    })
};



// 获取搜索的数据
export function getSearchApi(
    data: { limit: number }
) {
    return service({
        method: "GET",
        url: "/search/suggest",
        params: data,
    })
};

// 获取搜索详细的数据
export function getCloudSearchApi(
    data: { limit: number }
) {
    return service({
        method: "GET",
        url: "/cloudsearch",
        params: data,
    })
};

// 获取搜索歌手，专辑的数据
export function getMultiMatchApi(
    data: { limit: number }
) {
    return service({
        method: "GET",
        url: "/search/multimatch",
        params: data,
    })
};



// 获取热搜的数据
export function getHotSearchApi(
    data: { limit: number }
) {
    return service({
        method: "GET",
        url: "/search/hot",
        params: data,
    })
};